package com.software.management;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Group {
    private String name;
    private int id;
    private int membernum;
    private int point;
    private List<Student> PBLgroup=new ArrayList<>();



    //无参的构造方法
    public Group(){

    }
    //有参构造方法
    public Group(String name,int id){
        this.name=name;
        this.id=id;//a和b是等下要传进去的值，即形式参数
        this.membernum=0;
        this.point=0;
    }
    //get和set方法
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getId() {
        return id;
    }

    public int getNum(){
        return this.membernum;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getPoint(){
        return this.point;
    }

    //添加学生信息，每添加一次，学生数量就++
    public void setStudent(Student stu){
        PBLgroup.add(stu);
        ++this.membernum;
    }

    //返回小组的第ind个成员
    public Student getMember(int ind){
        return PBLgroup.get(ind);
    }



    //打印小组类信息
    @Override
    public String toString() {
        return "Group{" +
                "name='" + name + '\'' +
                ", id=" + id +
                '}';
    }
}

















//public int fixGroPoint(){
//    System.out.print("请输入要给学生加几分：");
//    Scanner scanner=new Scanner(System.in);
//    int newpoint= scanner.nextInt();
//    this.point+=newpoint;
//    return point;
//}